package cn.exrick.xboot.modules.graphics.param;

import cn.exrick.xboot.base.param.BaseParam;
import cn.exrick.xboot.modules.graphics.entity.GraphicsContainer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *首页画布参数
 * @Auther: njp
 * @Date: 2020/09/04/17:58
 * @Description:
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class GraphicsPageParam extends BaseParam {
    @NotNull(message = "id不能为空，请检查id参数", groups = {edit.class, delete.class,detail.class,saveLayout.class,start.class,copy.class})
    @Null(message = "id不为空，请不要传id",groups = {add.class})
    private String id;
    @NotNull(message = "界面标题不能为空,请检查title参数",groups = {add.class})
    private String title;
    @NotNull(message = "机构不能为空，请检查orgId参数",groups = {add.class,copy.class})
    private String orgId;
    @NotNull(message = "排序值不能为空，请检查sortOrder参数")
    private Integer sortOrder=0;
    @NotNull(message = "列不能为空，请检查cols参数",groups = {saveLayout.class})
    private Integer cols;
    @NotNull(message = "行不能为空，请检查rows参数",groups = {saveLayout.class})
    private Integer rows;
    @ApiModelProperty(value = "界面的使用状态（0：未被使用1：代表被使用）")
    private Integer status;
    /**
     * 画布容器中间表数据（主要获取容器与界面对应关系）
     */
    @NotNull(message = "坐标参数不能为空")
    private List<GraphicsContainer> layoutDetail;

    /**
     * 参数校验分组：界面设计的保存
     */
    public @interface saveLayout {};

    /**
     * 参数校验分组：开启/启用
     */
    public @interface start{};
    /**
     * 参数校验分组：复制
     */
    public @interface copy{};
    /**
     * 参数校验分组：获取某组织启用状态的界面信息
     */
   // public @interface getOrgStart{};

}
